<template>
  <div>
      <h4>添加汽车xxx</h4>
      品牌：<input type="text" v-model="carObj.type"/><br>
      价格：<input type="text" v-model="carObj.price"/><br>
      产地：<input type="text" v-model="carObj.address"/><br>
      <input type="button" value="添加" @click="add"/>
  </div>
</template>

<script>
export default {
    data(){
        return {
            carObj:{}
        }
    },
    methods:{
        async add(){
            var info = await this.ajax.postSubmit("/project/car/add",this.carObj);
            if(info == "ok"){ 
                this.$emit("find",{pageNO:1});
                this.carObj = {};
            }
        }
    }
}
</script>

<style>

</style>